<?php
/**
 * Pipahr
 *
 * @author Randy Zhao
 * @copyright 2014 pipahr.com
 */

JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_puser/tables');
JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_jobs/tables');

/**
 * Registration controller class for Users.
 */
class PMobileModelMobile extends JModelLegacy
{
   public function getUpdate() {
      $db = PFactory::getDbo();
      $query = "SELECT version_code AS latest_version_code, version_name AS latest_version_name, download_url, change_log, unistall_version
               FROM #__mobile_updates WHERE 1 ORDER BY version_code DESC LIMIT 1";
      $db->setQuery($query);
      return $db->loadAssoc();
   }

}
